<?php
class TestMembase {
	function getByKey($key) {
		$memcache_obj = memcache_connect('localhost', 11211);
		return $memcache_obj->get($key);
	}
	
	function addKey($key, $value) {
		$memcache_obj = memcache_connect('localhost', 11211);
		if(!$memcache_obj->set($key, $value))
			return "Error adding new key!";
		else
			return "Key added!";
	}
}